﻿@model AncientLand.Service.Entity.PageItem
<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix">
    <div class="dataTables_info">
        当前页 @Model.CurrentPage/@Model.TotalPages</div>
    <div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers">
        @if (Model.CurrentPage > 1)
        {
            <span class="first ui-corner-tl ui-corner-bl fg-button ui-button ui-state-default">
                <a href="@Url.Content("~/" + Model.ControllerName + "/" + Model.ActionName + "?page=1")">首页</a></span>
            <span class="previous fg-button ui-button ui-state-default">
            <a href="@Url.Content("~/" + Model.ControllerName + "/" + Model.ActionName + "?page=" + (Model.CurrentPage - 1))">上一页</a></span>
            
        }
        else
        {
            <span class="first ui-corner-tl ui-corner-bl fg-button ui-button ui-state-default ui-state-disabled">
                首页</span>
            <span class="previous fg-button ui-button ui-state-default ui-state-disabled">上一页</span>
        }
        @if (Model.CurrentPage < Model.TotalPages)
        {            
            <span class="next fg-button ui-button ui-state-default"><a href="@Url.Content("~/" + Model.ControllerName + "/" + Model.ActionName + "?page=" + (Model.CurrentPage + 1))">下一页</a></span>
            <span class="last ui-corner-tr ui-corner-br fg-button ui-button ui-state-default">
            <a href="@Url.Content("~/" + Model.ControllerName + "/" + Model.ActionName + "?page=" + Model.TotalPages)">最后一页</a></span>
        }
        else
        {
            <span class="next fg-button ui-button ui-state-default ui-state-disabled">下一页</span>
            <span class="last ui-corner-tr ui-corner-br fg-button ui-button ui-state-disabled">最后一页</span>
        }
    </div>
</div>
